import React, { PureComponent } from 'react';
import { connect } from 'dva';
import {
  Menu, Dropdown,Button,Card,Row, Col,Icon,Input
} from 'antd';
import styles from './style.less';


@connect(state => ({
  autoMenu: state.autoMenu,
}))
export default class RdAutoMenu extends PureComponent {

  state = {
    menuList:[]
  }


  menuClick = () =>{

  }

  addMenuModel(){
    const menu = (
      <Menu>
        <Menu.Item>
          <a target="_blank" rel="noopener noreferrer" href="http://www.alipay.com/">1st menu item</a>
        </Menu.Item>
      </Menu>
    );

    return <Dropdown overlay={menu} placement="topCenter">
              <Button onClick={()=>this.menuClick()}><Icon type="plus" />默认菜单</Button>
          </Dropdown>
  }

  render() {
    const { menuList } = this.state;

    return (
      <div className="gutter-example">
        <Row gutter={16}>
          <Col className="gutter-row" span={1}>
          </Col>
          <Col className="gutter-row" span={11}>
            <Card title="自定义菜单">
              <div style={{marginTop:400}}>
                {menuList}
              </div>
            </Card>
          </Col>
          <Col className="gutter-row" span={1}>
          </Col>
          <Col className="gutter-row" span={11}>
            <Card title="操作" style={{height:"100%"}}>
              <Row gutter={16}>
                <Col className="gutter-row" span={4} >
                  xxxx啧啧啧
                </Col>
                <Col className="gutter-row" span={20}>
                  <Input  placeholder="Username" />
                </Col>
              </Row>
            </Card>
          </Col>
        </Row>
      </div>
    );
  }
}
